<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-wrap align-center justify-center benben-position-layout flex my_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub my_fd0_0'>
					<view class='flex flex-wrap align-center my_fd0_0_c0'>
					</view>
					<view class='flex flex-wrap align-center my_fd0_0_c1' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/my/myNews/myNews`">
						<image class='my_fd0_0_c0' mode="aspectFit" :src='STATIC_URL+"56.png"'></image>
						<benben-message-num class='my_fd0_0_c1_c1' :message-num="newData.no_read_num" size='20'
							color='#fff' background-color='red'>
						</benben-message-num>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center my_flex_1" @tap.stop="jumpFunc(8,userData.aid)">
				<image class='my_fd1_0' mode="aspectFill" :src='userData.store_logo'></image>
				<view class='flex flex-direction flex-wrap align-stretch flex-sub'>
					<view class='flex flex-wrap align-center my_fd1_1_c0'>
						<text class='my_fd1_1_c0_c0'>{{userData.store_name}}</text>
						<view class='flex flex-wrap align-center my_fd1_1_c0_c1'>
							<text class='my_fd1_1_c0_c1_c0'>店铺星级：</text>
							<view class='flex flex-wrap align-center'>
								<template v-for="starNum in [1,2,3,4,5]">
									<image v-if="userData.store_star >= starNum" :key="starNum"
										class='my_star1fd1_1_c0_c1_c1' mode="aspectFit" :src='STATIC_URL+"58.png"'>
									</image>
									<image v-else :key="starNum" class='my_star1fd1_1_c0_c1_c1' mode="aspectFit"
										:src='STATIC_URL+"31.png"'></image>
								</template>
							</view>
						</view>
					</view>
					<view class='flex flex-wrap align-center my_fd1_1_c0'>
						<view class='flex flex-wrap align-center my_fd1_1_c0_c1'>
							<text class='my_fd1_1_c1_c0_c0'>{{determineData.joinin_state_name}}</text>
						</view>
					</view>
					<view class='flex flex-wrap align-center'>
						<image class='my_fd1_1_c2_c0' mode="aspectFit" :src='STATIC_URL+"57.png"'></image>
						<text class='my_fd1_1_c0_c1_c0'>{{userData.store_address}}</text>
					</view>
				</view>
			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout my_flex_2"
				@tap.stop="jumpFunc()">
				<view class='flex flex-wrap align-center' @tap.stop="jumpFunc(1)">
					<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"62.png"'></image>
					<view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
						<text class='my_fd2_0_c1_c0'>我的钱包</text>
						<image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
					</view>
				</view>
				<view class='flex flex-wrap align-center' @tap.stop="jumpFunc(2)">
					<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"61.png"'></image>
					<view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
						<text class='my_fd2_0_c1_c0'>我的优惠券</text>
						<image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
					</view>
				</view>
				<view class='flex flex-wrap align-center' @tap.stop="jumpFunc(3)">
					<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"60.png"'></image>
					<view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
						<text class='my_fd2_0_c1_c0'>店铺管理</text>
						<image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
					</view>
				</view>
				<view class='flex flex-wrap align-center' @tap.stop="jumpFunc(4)">
					<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"60.png"'></image>
					<view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
						<text class='my_fd2_0_c1_c0'>服务列表</text>
						<image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
					</view>
				</view>
				<view class='flex flex-wrap align-center' @tap.stop="jumpFunc(5)">
					<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"61.png"'></image>
					<view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
						<text class='my_fd2_0_c1_c0'>师傅列表</text>
						<benben-message-num class='my_fd2_0_c10066' :message-num="shopNewData.num" size='20'
							color='#fff' background-color='red'>
						</benben-message-num>
						<image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
					</view>
				</view>
				<view class='flex flex-wrap align-center' @tap.stop="jumpFunc(6)">
					<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"63.png"'></image>
					<view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
						<text class='my_fd2_0_c1_c0'>学习任务</text>
						<image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
					</view>
				</view>
				<view class='flex flex-wrap align-center' @tap.stop="jumpFunc(7)">
					<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"63.png"'></image>
					<view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
						<text class='my_fd2_0_c1_c0'>课程管理</text>
						<image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
					</view>
				</view>
				<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/index/ranking/ranking`">
					<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"59.png"'></image>
					<view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
						<text class='my_fd2_0_c1_c0'>排行榜</text>
						<image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
					</view>
				</view>
				<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/set/feedback/feedback`">
					<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"64.png"'></image>
					<view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
						<text class='my_fd2_0_c1_c0'>意见反馈</text>
						<image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
					</view>
				</view>
				<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/my/customerService/customerService`">
					<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"140.png"'></image>
					<view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
						<text class='my_fd2_0_c1_c0'>联系客服</text>
						<image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
					</view>
				</view>
				<view class='flex flex-wrap align-center flex-sub' @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/set/set/set`">
					<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"65.png"'></image>
					<view class='flex flex-wrap align-center justify-between flex-sub my_fd2_9_c1'>
						<text class='my_fd2_0_c1_c0'>系统设置</text>
						<image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"84.png"'></image>
					</view>
				</view>
			</view>

			<!---flex布局flex布局结束-->
			<benben-popup v-model="popupShow1712040712602" :mask="true" :mask-close-able="true" mode='center'>
				<!---未认证弹窗flex布局开始-->
				<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout my_flex_3">
					<text class='my_fd3_0'>提示</text>
					<text class='my_fd3_1'>您还未认证，请先认证！</text>
					<view class='flex flex-wrap align-center'>
						<button class='my_fd3_2_c0' @tap.stop="popupShow1712040712602=false">取消</button>
						<button class='my_fd3_2_c1' @tap.stop="hideJumpFunc()">去认证</button>
					</view>
				</view>

				<!---未认证弹窗flex布局结束-->

			</benben-popup>
			<benben-popup v-model="popupShow1712040039970" :mask="true" :mask-close-able="true" mode='center'>
				<!---认证失败弹窗flex布局开始-->
				<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout my_flex_4">
					<text class='my_fd4_0'>提示</text>
					<text class='my_fd4_1'>您的认证失败，请重新认证！</text>
					<view class='flex flex-wrap align-center'>
						<button class='my_fd4_2_c0' @tap.stop="popupShow1712040039970=false">取消</button>
						<button class='my_fd4_2_c1' @tap.stop="hideWindowFunc()">重新认证</button>
					</view>
				</view>

				<!---认证失败弹窗flex布局结束-->

			</benben-popup>


		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"popupShow1712040039970": false,
				"popupShow1712040712602": false,
				"shopID": uni.getStorageSync('shopID') || '',
				"userData": {
					"aid": "",
					"store_name": "",
					"store_logo": "",
					"store_address": "",
					"business_licence": "",
					"contacts_name": "",
					"contacts_phone": "",
					"store_backdrop": "",
					"service_phone": "",
					"business_hours": "",
					"store_introduce": "",
					"store_star": "",
					"store_collection_num": "",
					"certification_status": "",
					"store_status": "",
					"is_collection": "",
					"mobile": "",
					"expiration_time": "",
					"location": "",
					"store_backdrop_many": [],
					"end_time": "",
					"score": "",
					"examine": ""
				},
				"determineData": {
					"invite_code": "",
					"address": "",
					"address_code": "",
					"hobby": "",
					"tags": "",
					"id": "",
					"userlevel_id": "",
					"mobile": "",
					"real_name": "",
					"nickname": "",
					"avatar": "",
					"account": "",
					"email": "",
					"birthday": "",
					"gender": "",
					"create_time": "",
					"user_money": "",
					"freeze_money": "",
					"total_consumption_money": "",
					"score": "",
					"_mobile": "",
					"coupon": "",
					"collection_count": "",
					"browse_count": "",
					"total_money": "",
					"certified": "",
					"is_pay_password": "",
					"fuwuxingji": "",
					"gongzuozhuangtai": "",
					"shuzi": "",
					"jifen": "",
					"yajin": "",
					"level": {
						"aid": "",
						"name": "",
						"icon": "",
						"levelid": ""
					},
					"invite_num": "",
					"commission": "",
					"is_deposit": "",
					"is_account": "",
					"dengjidaoqishijian": "",
					"suozaidi": "",
					"huiyuanyue": "",
					"working_hours": "",
					"credit_score": "",
					"deposit": "",
					"deposit_switch": "",
					"withdrawal": "",
					"account_wx": "",
					"account_alipay": "",
					"account_bank": "",
					"joinin_state": "",
					"fid": "",
					"chinaarea_id": "",
					"city_status": "",
					"service_status": "",
					"remark": "",
					"deposit_money": "",
					"joinin_state_name": ""
				},
				"type": "",
				"newData": {
					"order_num": "",
					"sys_num": "",
					"no_read_num": "",
					"new_order_message": "",
					"new_sys": "",
					"order_time": "",
					"sys_time": ""
				},
				"shopNewData": {
					"num": ""
				}
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},
			userInfo: {
				get() {
					return this.$store.state.userInfo
				},
				set() {
					this.$store.commit('updateUserInfo', value)
				},
			},
			isLogin() {
				return this.$store.state.token == '' ? false : true;
			}
		},
		watch: {},
		onLoad(options) {

		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.shopID = uni.getStorageSync('shopID') || ''
			this.getUserDataFunc()
			this.getDataFunc()
			this.getNewDataFunc()
			this.shopNewDataFunc()
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取用户信息
			async getUserDataFunc() {
				//请求方法
				//数据验证
				if (this.isLogin == true) {
					let datauserData = await this.$api.get(global.apiUrls.post641b0ae793987, {
						partner_id: this.shopID,
						user_id: this.userInfo.id
					});
					if (datauserData.data.code != 1) {
						this.$message.info(datauserData.data.msg);
						return
					}
					let infouserData = datauserData.data;
					this.userData = infouserData.data
				}
			},
			//判断
			determineFunc() {
				if (this.determineData.joinin_state == 0) {
					this.popupShow1712040712602 = true;
				} else if (this.determineData.joinin_state == '3') {
					this.popupShow1712040039970 = true;
				}
			},
			//跳转
			jumpFunc(ID, shopID) {
				if (this.determineData.joinin_state == 0) {
					this.popupShow1712040712602 = true;
				} else if (this.determineData.joinin_state == '3') {
					this.popupShow1712040039970 = true;
				} else if (this.determineData.joinin_state == '1') {
					uni.showToast({
						title: '认证审核中，请耐心等待',
						mask: true,
						icon: 'none',
						duration: 1500
					});
					return
				} else if (ID == '1') {
					this.$urouter.navigateTo(`/pages/my/myMoney/myMoney`);
				} else if (ID == '2') {
					this.$urouter.navigateTo(`/pages/order/couponUnused/couponUnused`);
				} else if (ID == '3') {
					this.$urouter.navigateTo(`/pages/order/shopManagement/shopManagement`);
				} else if (ID == '4') {
					this.$urouter.navigateTo(`/pages/order/serviceList/serviceList`);
				} else if (ID == '5') {
					this.$urouter.navigateTo(`/pages/order/masterList/masterList`);
				} else if (ID == '6') {
					this.$urouter.navigateTo(`/pages/my/learningTasks/learningTasks`);
				} else if (ID == '7') {
					this.$urouter.navigateTo(`/pages/my/assignment/assignment`);
				} else if (ID == '8') {
					this.$urouter.navigateTo(`/pages/order/storeDetails/storeDetails?id=${shopID}`);
				}
			},
			//获取商家信息
			async getDataFunc() {
				//请求方法
				//数据验证
				if (this.isLogin == true) {
					let datadetermineData = await this.$api.get(global.apiUrls.post5c78c4772da97, {

					});

					if (datadetermineData.data.code != 1) {
						this.$message.info(datadetermineData.data.msg);
						return
					}
					let infodetermineData = datadetermineData.data;
					this.determineData = infodetermineData.data

					this.determineFunc()
				}
			},
			//获取全部消息
			async getNewDataFunc() {
				//请求方法
				//数据验证
				if (this.isLogin == true) {
					let datanewData = await this.$api.get(global.apiUrls.post64140908ca17c, {

					});

					if (datanewData.data.code != 1) {
						this.$message.info(datanewData.data.msg);
						return
					}
					let infonewData = datanewData.data;
					this.newData = infonewData.data
					uni.setTabBarBadge({
						index: 2,
						text: this.newData.no_read_num
					})
				}
			},
			//商家端-待审核师傅角标
			async shopNewDataFunc() {
				//请求方法
				//数据验证
				if (this.isLogin == true) {
					let datashopNewData = await this.$api.get(global.apiUrls.post6662b49c32c4b, {

					});

					if (datashopNewData.data.code != 1) {
						this.$message.info(datashopNewData.data.msg);
						return
					}
					let infoshopNewData = datashopNewData.data;
					this.shopNewData = infoshopNewData.data
				}
			},
			//隐藏认证跳转
			hideJumpFunc() {
				this.popupShow1712040712602 = false;
				this.$urouter.navigateTo(`/pages/login/settlementMerchants/settlementMerchants`);
			},
			//隐藏认证失败跳转
			hideWindowFunc() {
				this.popupShow1712040039970 = false;
				this.$urouter.navigateTo(`/pages/login/revieweds/revieweds`);
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: url(image-path('55.png')) no-repeat, #F8F8F8;
		background-size: 100% auto;
	}

	.my_flex_0 {
		background: url(image-path('55.png')) no-repeat, transparent;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.my_fd0_0_c1_c1 {
		position: absolute;
		right: -10rpx;
		top: -10rpx;
	}

	.my_fd0_0_c1 {
		position: relative;
	}

	.my_fd0_0_c0 {
		width: 40rpx;
		height: 40rpx;
	}

	.my_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.my_flex_1 {
		padding: 0rpx 24rpx 0rpx 24rpx;
		margin: 0rpx 0rpx 40rpx 0rpx;
	}

	.my_fd1_1_c2_c0 {
		width: 24rpx;
		height: 24rpx;
		margin: 0rpx 8rpx 0rpx 0rpx;
	}

	.my_fd1_1_c1_c0_c0 {
		line-height: 33rpx;
		font-size: 22rpx;
		font-weight: 400;
		color: var(--benbenFontColor3);
	}

	.my_star1fd1_1_c0_c1_c1 {
		height: 24rpx;
		margin: 0rpx 4rpx 0rpx rpx;
		width: 24rpx;
	}

	.my_star1fd1_1_c0_c1_c1 {
		width: 24rpx;
		height: 24rpx;
		margin: 0rpx 4rpx 0rpx 0rpx;
	}

	.my_fd1_1_c0_c1_c0 {
		line-height: 33rpx;
		font-size: 24rpx;
		font-weight: 400;
		color: #FFFFFF;
	}

	.my_fd1_1_c0_c1 {
		background: rgba(255, 255, 255, 0.2);
		padding: 0rpx 10rpx 0rpx 10rpx;
		background-size: 100% auto !important;
	}

	.my_fd1_1_c0_c0 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #FFFFFF;
		max-width: 280rpx;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.my_fd1_1_c0 {
		margin: 0rpx 0rpx 10rpx 0rpx;
	}

	.my_fd1_0 {
		width: 90rpx;
		height: 90rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.my_flex_2 {
		background: #fff;
		margin: 0rpx 24rpx 0rpx 24rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx;
		padding: 0rpx 24rpx 0rpx 24rpx;
	}

	.my_fd2_9_c1 {
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.my_fd2_0_c1_c1 {
		width: 14rpx;
		height: 26rpx;
	}

	.my_fd2_0_c1_c0 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 40rpx;
	}

	.my_fd2_0_c1 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.my_fd2_0_c0 {
		width: 40rpx;
		height: 40rpx;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.my_flex_3 {
		background: #fff;
		width: 540rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.my_fd3_2_c1 {
		border-top: 1px solid #eee;
		border-left: 1px solid #eee;
		background: #fff;
		border-radius: 0rpx 0rpx 16rpx 0rpx;
		font-size: 32rpx;
		color: rgba(227, 29, 26, 1);
		width: 269rpx;
		height: 94rpx;
		line-height: 94rpx;
		font-weight: 500;
	}

	.my_fd3_2_c0 {
		border-top: 1px solid #eee;
		border-right: 1px solid #eee;
		background: #fff;
		border-radius: 0rpx 0rpx 0rpx 16rpx;
		font-size: 32rpx;
		color: rgba(153, 153, 153, 1);
		width: 269rpx;
		height: 94rpx;
		line-height: 94rpx;
		font-weight: 500;
	}

	.my_fd3_1 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
		padding: 0rpx 56rpx 0rpx 56rpx;
		text-align: center;
		margin: 0rpx 0rpx 37rpx 0rpx;
	}

	.my_fd3_0 {
		line-height: 50rpx;
		font-size: 36rpx;
		font-weight: 800;
		color: #333333;
		margin: 40rpx 0rpx 32rpx 0rpx;
		padding: 0rpx 56rpx 0rpx 56rpx;
		text-align: center;
	}

	.my_flex_4 {
		background: #fff;
		width: 540rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.my_fd4_2_c1 {
		border-top: 1px solid #eee;
		border-left: 1px solid #eee;
		background: #fff;
		border-radius: 0rpx 0rpx 16rpx 0rpx;
		font-size: 32rpx;
		color: rgba(227, 29, 26, 1);
		width: 269rpx;
		height: 94rpx;
		line-height: 94rpx;
		font-weight: 500;
	}

	.my_fd4_2_c0 {
		border-top: 1px solid #eee;
		border-right: 1px solid #eee;
		background: #fff;
		border-radius: 0rpx 0rpx 0rpx 16rpx;
		font-size: 32rpx;
		color: rgba(153, 153, 153, 1);
		width: 269rpx;
		height: 94rpx;
		line-height: 94rpx;
		font-weight: 500;
	}

	.my_fd4_1 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
		padding: 0rpx 56rpx 0rpx 56rpx;
		text-align: center;
		margin: 0rpx 0rpx 37rpx 0rpx;
	}

	.my_fd4_0 {
		line-height: 50rpx;
		font-size: 36rpx;
		font-weight: 800;
		color: #333333;
		margin: 40rpx 0rpx 32rpx 0rpx;
		padding: 0rpx 56rpx 0rpx 56rpx;
		text-align: center;
	}

	.my_fd2_0_c10066 {
		margin: 0rpx auto 0rpx 16rpx;
	}
</style>